//执行一次，setTimeout
setTimeout(() => {
    console.log("setTimeout function 1");
}, 2000);

setTimeout(function(){
    console.log("setTimeout function 2");
}, 2000);
//重复执行，setInterval
setInterval(function(){
    console.log("setInterval function ");
},2000) ;
//创建和清除
var time=0;
var time_c=setInterval(function(){
    time+=2;
    console.log(time+" seconds have passed....");
    if(time>5){
        clearInterval(time_c);
    }
},2000);


console.log(__dirname);
// Prints: /Users/mjr
console.log(__filename);
// Prints: /Users/mjr